/*
package org.example.service;

import org.example.dto.OrderDTO;
import org.example.util.OrderTemplate;
import org.springframework.stereotype.Component;

import java.io.OutputStream;

@Component("myCustomTemplateEngine")
public class TemplateEngine {

    private final OrderTemplate orderTemplate;

    public TemplateEngine(OrderTemplate orderTemplate) {
        this.orderTemplate = orderTemplate;
    }

    public void printOrder(OutputStream outputStream, OrderDTO order, boolean cutPaper) {
        try {
            orderTemplate.printOrder(outputStream, order, cutPaper);
        } catch (Exception e) {
            throw new RuntimeException("模板渲染失败", e);
        }
    }
}
*/
